    <?php if ($current_customer['group_id'] == '1'): ?>
        <div class="admin_left actions">
        	<h3><?php echo __('Manage more'); ?></h3>
        	<ul>
        		<li style="list-style-type:none; margin-left:0; padding-top:15px;"><?php echo $this->Html->link(__('Edit Category'), array('action' => 'edit', $category['Category']['id']),array('class' => 'consistentButton')); ?> </li>
        		<li style="list-style-type:none; margin-left:0; padding-top:15px;"><?php echo $this->Form->postLink(__('Delete Category'), array('action' => 'delete', $category['Category']['id']),array('class' => 'consistentButton'), null, __('Are you sure you want to delete # %s?', $category['Category']['id'])); ?> </li>
        		<li style="list-style-type:none; margin-left:0; padding-top:15px;"><?php echo $this->Html->link(__('List Categories'), array('action' => 'index'),array('class' => 'consistentButton')); ?> </li>
        		<li style="list-style-type:none; margin-left:0; padding-top:15px;"><?php echo $this->Html->link(__('New Category'), array('action' => 'add'),array('class' => 'consistentButton')); ?> </li>
        		<li style="list-style-type:none; margin-left:0; padding-top:15px;"><?php echo $this->Html->link(__('List Items'), array('controller' => 'items', 'action' => 'index'),array('class' => 'consistentButton')); ?> </li>
        		<li style="list-style-type:none; margin-left:0; padding-top:15px;"><?php echo $this->Html->link(__('New Item'), array('controller' => 'items', 'action' => 'add'),array('class' => 'consistentButton')); ?> </li>
        	</ul>
        </div>

        <div  id="pinkHeader" class="admin_right categories publicItemIndex">
            <h2><?php echo __('Category'); ?></h2>
            <table cellpadding = "0" cellspacing = "0" class="table table-striped table-bordered" style="width:50%;">
                <tr>
                    <td style="margin-left:2%;"><?php echo h($category['Category']['name']); ?></td>
                    <td style="margin-left:2%;"><?php echo h($category['Category']['description']); ?></td>
                </tr>
            </table>

            <div id="pinkHeader" class="related">
                <h3><?php echo __('Related Items'); ?></h3>
                <?php if (!empty($category['Item'])): ?>
                <table cellpadding = "0" cellspacing = "0" class="table table-striped table-bordered">
                    <tr>
                        <th><?php echo __('Id'); ?></th>
                        <th><?php echo __('Name'); ?></th>

                        <th class="actions"><?php echo __('Actions'); ?></th>
                    </tr>
                    <?php
                        $i = 0;
                        foreach ($category['Item'] as $item): ?>
                        <tr>
                            <td><?php echo $item['id']; ?></td>
                            <td><?php echo $item['name']; ?></td>

                            <td class="actions">
                                <?php echo $this->Html->link(__('View'), array('controller' => 'items', 'action' => 'view', $item['id'])); ?>
                                <?php echo $this->Html->link(__('Edit'), array('controller' => 'items', 'action' => 'edit', $item['id'])); ?>
                                <?php echo $this->Form->postLink(__('Delete'), array('controller' => 'items', 'action' => 'delete', $item['id']), null, __('Are you sure you want to delete # %s?', $item['id'])); ?>
                            </td>
                        </tr>
                    <?php endforeach; ?>
                </table>
                <?php endif; ?>
            </div>
        </div>

    <?php else: ?>

        <div style="text-align:left;"class="Category CategoriesLink">
            <h3 style="font-size:30px;">Categories</h3>
            <?php foreach ($categories as $category_enum): ?>
                <ul id="category_<?php echo h($category_enum['Category']['id']); ?>" class="category" style="list-style: none;">
                    <li><?php echo $this->html->link($category_enum['Category']['name'], array('controller' => 'categories', 'action' => 'view', $category_enum['Category']['id'])); ?>&nbsp;<li>
                </ul>
            <?php endforeach; ?>
        </div>

        <div class="admin_right">
            <?php if (!empty($category['Item'])): ?>
                <table cellpadding="5" cellspacing="0" class="table publicItemIndex">
                    <tr>
                        <?php
                                $inRow = 0;
                                foreach ($category['Item'] as $item) {
										/*
											The following if statement checks to see if the product should be displayed to the user.
											The if statement should NOT be here, it's just that the rest of the code makes no sense, hense it had nowhere else
												to go.
										*/
										if ($item['online'] == 'No' || $item['item_status_id'] != 1)
											continue;
                                        echo ("<td>");
                                        echo $this->Html->link($this->Html->image(IMG_DIR.'/'.$item['photo'], array('title' => $item['photo'], 'alt' => 'Preview image', 'height' => 200)), array('controller'=>'items','action'=>'view' . '/' . $item['id']), array('escape' => false));
                                        echo ("<br>");
                                        echo ("<br>");
                                        echo $this->html->link($item['name'], array('controller' => 'items', 'action' => 'view', $item['id']));
                                        echo __('      $');
                                        echo h($item['original_price']);
                                        echo ("<br>");
                                        echo ("<br>");
                                        echo ("<br>");
                                        echo ("</td>");
                                        $inRow++;
                                        if ($inRow % 3 == 0) {
                                                echo ("</tr>");
                                        }
                                }
                        ?>
                </table>
            <?php endif ?>
        </div>
    <?php endif ?>